<template>
  <b-button variant="light" class="option-button" @click="$emit('pop',index)">
    <div class="option-button-container">
      <span class="option-button-letter">{{letters[index]}}<small><small>#</small></small></span>
      <span class="option-button-text">{{text}}</span>
    </div>
  </b-button>
</template>

<script>
export default {
  props: {
    index: {
      type: Number,
      required: false,
      default: 0
    },
    text: {
      type: String,
      required: false,
      default: ""
    },
    status: {
      type: Number,
      required: false,
      default: 0
    }
  },
  computed: {
    letters(){
      return this.$store.state.config.letters;
    }
  }
};
</script>

<style scoped>
.option-button {
  outline: none;
  background: rgba(128, 128, 128, 0.1);
  border: 2px solid rgba(0, 0, 0, 0);
  /* padding: 1em 1em; */
  /* margin: 0.75em 0; */
  border-radius: 0.5em;
  transition: background-color 0.5s ease;
  transition: color 0.5s ease;
  transition: border-color 0.5s ease;
  word-wrap: break-word;
}
.option-button-container {
  display: grid;
  grid-template-columns: 2em 1fr;
}
.option-button-letter {
  display: flex;
  align-items:flex-start;
  justify-content: center;
  text-align: center;
  font-size: 1.5em;
  font-weight: bold;
  color: rgb(96, 192, 128);
  transition: color 0.5s ease;
  padding-right: 0.25em;
}
.option-button-text {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  text-align: justify;
  /* background-color: aqua; */
}
.option-button-incorrect {
  border: 2px solid rgba(192, 96, 64, 0.6);
  color: rgb(192, 96, 64);
  background-color: rgba(192, 96, 64, 0.2);
}
.option-button-correct {
  border: 2px solid rgba(96, 192, 128, 0.6);
  color: rgb(96, 192, 128);
  background-color: rgba(96, 192, 128, 0.2);
}
</style>